{template Public:Page:header}

<div class="container">
  <div class="row">
  
	<div class="col-lg-12">
      <div class="row">
        <div class="well">

			  <h3>城市分类</h3>
              <table class="table table-hover category_city_list">
                    <tbody>
                    <tr><td><a href="javascript:void(0);" onclick="SetNowCity(9999)" style="font-size:16px">全国</a> &nbsp; <a onclick="SetNowCity(1)" href="javascript:void(0);" style="font-size:16px">北京市</a>  &nbsp; <a onclick="SetNowCity(1)" href="javascript:void(0);" style="font-size:16px">北京市</a> &nbsp; <a onclick="SetNowCity(9)" href="javascript:void(0);" style="font-size:16px">上海市</a> &nbsp; <a onclick="SetNowCity(289)" href="javascript:void(0);" style="font-size:16px">广州市</a></td></tr>
                    {foreach $list $key=>$city}
                        	 <tr><td><b>{echo $key}</b> &nbsp;
                              {foreach $city $value}	
                             		<a href="javascript:void(0);" onclick="SetNowCity({echo $value['catid']})"><span{if $value['color']} style="color:{echo $value['color']}"{/if}>{echo $value['name']}</span></a>
                              {/foreach}
                             </td></tr>
                    {/foreach}
                    </tbody>
                </table>
                 
        </div>
      </div>
    </div>

</div>
</div>

<script>
function SetNowCity(id){
	$.post('/city/set/index/',{id:id}, function(json) {
						
		$('.bootbox').PhpappProgress({json:json});
	
		return true;
	
	}, 'json');
	
	
	bootbox.dialog({
	message: '<div class="progress progress-striped active"><div style="width: 1%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="20" role="progressbar" class="progress-bar progress-bar-info"><span>0%</span></div></div>',
	title: '<i class="icon fa fa-retweet"></i> 设置中',
	closeButton: false
	}).PhpappProgress({time:1000});
}
</script>
{template Public:Page:footer}